package Vista;
import java.awt.event.ActionListener;
import javax.swing.JButton;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Menu extends javax.swing.JFrame {
 private JButton btnRegistrarUmpire;
 private JButton btnRegistrarEquipo;
 private JButton btnGenerarPartidos;
 private JButton btnCalendario;
 private JButton btnListadoPosiciones;
 private JButton btnSalirMenu;

 /**
 * Auto-generated main method to display this JFrame
 */
  
 public Menu() {
  super();
  initGUI();
 }
 
 private void initGUI() {
  try {
   setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
   getContentPane().setLayout(null);
   this.setTitle("Menu");
   {
    btnRegistrarUmpire = new JButton();
    getContentPane().add(btnRegistrarUmpire);
    btnRegistrarUmpire.setText("Rgistrar Umpire");
    btnRegistrarUmpire.setBounds(126, 56, 152, 24);
   }
   {
    btnRegistrarEquipo = new JButton();
    getContentPane().add(btnRegistrarEquipo);
    btnRegistrarEquipo.setText("Registrar Equipo");
    btnRegistrarEquipo.setBounds(126, 26, 152, 23);
   }
   {
    btnSalirMenu = new JButton();
    getContentPane().add(btnSalirMenu);
    btnSalirMenu.setText("Salir");
    btnSalirMenu.setBounds(340, 208, 91, 23);
   }
   {
    btnGenerarPartidos = new JButton();
    getContentPane().add(btnGenerarPartidos);
    btnGenerarPartidos.setText("Generar Partidos");
    btnGenerarPartidos.setBounds(126, 85, 152, 23);
   }
   {
    btnListadoPosiciones = new JButton();
    getContentPane().add(btnListadoPosiciones);
    btnListadoPosiciones.setText("Listado Posiciones");
    btnListadoPosiciones.setBounds(126, 114, 152, 23);
   }
   {
    btnCalendario = new JButton();
    getContentPane().add(btnCalendario);
    btnCalendario.setText("Calendario");
    btnCalendario.setBounds(126, 142, 152, 23);
   }
   pack();
   this.setSize(521, 318);
  } catch (Exception e) {
      //add your error handling code here
   e.printStackTrace();
  }
 }

	 public void addActionListener(ActionListener accion){
		  btnRegistrarEquipo.addActionListener(accion);
		  btnGenerarPartidos.addActionListener(accion);
		  btnSalirMenu.addActionListener(accion);
		  btnCalendario.addActionListener(accion);
		  btnListadoPosiciones.addActionListener(accion);
		  btnRegistrarUmpire.addActionListener(accion);
	 }

 public void mostrarMensaje(String mensaje) {
  JOptionPane.showMessageDialog(this, mensaje);
 }
}